import {post, postForm} from './http'
import {AuthUrlType, ResponseType} from "./types.ts";

export default {
    login:(params:any):Promise<String> => post('/login', params, ResponseType.TEXT,AuthUrlType.NO_AUTH),
    register:(params:any) => post('/register', params,ResponseType.JSON,AuthUrlType.NO_AUTH),
    onlineUsers:(params:any) => post('/onlineUsers', params),
    searchUsers:(params:any) => post('/searchUsers', params),
    uploadFile:(params:any) => postForm('/uploadFile', params, ResponseType.TEXT,AuthUrlType.AUTHORIZE),
}